<?php
/**
 * Blog river view.
 */

$item = $vars['item'];
$object = $vars['item']->getObjectEntity();
$excerpt = elgg_get_excerpt($object->description);
$timestamp = elgg_get_friendly_time($item->getPostedTime());

$message = <<<MSG
<div class="brief">{$excerpt} <a href="javascript:void(0)" class="toggle">show all</a></div>
<div class="detail">{$object->description} <a href="javascript:void(0)" class="toggle">hide detail</a></div>
MSG;

$securities = $object->securities;
if ($securities) {
	if (is_array($securities)) {
		$sec = $securities[0];
	} else {
		$sec = $securities;
	}
	$sec_url = elgg_get_site_url()."xray/{$sec}";
	
	//{$timestamp} &nbsp;&nbsp;&nbsp; 
$message .= <<<MSG
<div class="footer"><span class="info">about:</span><a class="stock" href="{$sec_url}" target="_blank">{$sec}</a></div>
MSG;
}

echo elgg_view('river/elements/layout', array(
	'item' => $vars['item'],
	'message' => $message,
));